import request from '@/utils/request.js';

// 用户登录
export function userLogin(data) {
  return request({
    url: `/auth/oauth/token?grant_type=password&client_id=client-cheng-an&client_secret=chang-an&loginType=password&username=${data.username}&password=${data.password}&code=${data.code}`,
    method: 'post',
    data,
  });
}

// 获取用户菜单
export function getMenu() {
  return request({
    url: '/system/sys-menu/getMenu',
    method: 'get',
  });
}

// 获取用户信息
export function getUserInfo() {
  return request({
    url: '/system/sys-user/getUserInfo',
    method: 'get',
  });
}
